atomic_float
This crate provides AtomicF32
and AtomicF64
types that behave almost identically to the integer atomics in the stdlib.
Usage
use AtomicF32;
use Relaxed;
static A_STATIC: AtomicF32 = new;
// Should support the full std::sync::atomic::AtomicFoo API
A_STATIC.fetch_add;
A_STATIC.fetch_sub;
// But also supports things that can be implemented
// efficiently easily, like sign-bit operations.
A_STATIC.fetch_neg;
assert_eq!;
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Public domain, as explained by the Unlicense (UNLICENSE or http://opensource.org/licenses/Unlicense)
at your option.